//
//  MyStoreViewController.m
//  PeopleStreet
//
//  Created by 辰领科技 on 16/6/6.
//  Copyright © 2016年 yuf. All rights reserved.
//

#import "MyStoreViewController.h"

@interface MyStoreViewController ()<UITextFieldDelegate>
@property (strong, nonatomic) IBOutlet UIView *navView;
@property (strong, nonatomic) IBOutlet UIView *oneButtonView;
@property (strong, nonatomic) IBOutlet UIView *twoButtonView;
@property (strong, nonatomic) IBOutlet UIView *threeButtonView;
@property (strong, nonatomic) IBOutlet UIView *fourButtonView;
@property (strong, nonatomic) IBOutlet UIView *fiveButtonView;
@property (strong, nonatomic) IBOutlet UIView *sixButtonView;
@property (weak, nonatomic) IBOutlet UITextField *registField;


@property (weak, nonatomic) IBOutlet UILabel *numberOne;
@property (weak, nonatomic) IBOutlet UILabel *numberTwo;
@property (weak, nonatomic) IBOutlet UILabel *numberThree;
@property (weak, nonatomic) IBOutlet UILabel *numberFour;
@property (weak, nonatomic) IBOutlet UILabel *numberFive;
@property (weak, nonatomic) IBOutlet UILabel *numberSix;


@end

@implementation MyStoreViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initViewLayout];
}

- (void)initViewLayout{
    [self adaptiveViewLayout:self.view];
    [self adaptiveViewLayout:self.navView];
    [self adaptiveViewLayout:self.oneButtonView];
    [self adaptiveViewLayout:self.twoButtonView];
    [self adaptiveViewLayout:self.threeButtonView];
    [self adaptiveViewLayout:self.fourButtonView];
    [self adaptiveViewLayout:self.fiveButtonView];
    [self adaptiveViewLayout:self.sixButtonView];
    
    _numberOne.layer.masksToBounds = YES;
    _numberTwo.layer.masksToBounds = YES;
    _numberThree.layer.masksToBounds = YES;
    _numberFour.layer.masksToBounds = YES;
    _numberFive.layer.masksToBounds = YES;
    _numberSix.layer.masksToBounds = YES;
    
    _numberOne.layer.cornerRadius = 6*VerticalRatio();
    _numberTwo.layer.cornerRadius = 6*VerticalRatio();
    _numberThree.layer.cornerRadius = 6*VerticalRatio();
    _numberFour.layer.cornerRadius = 6*VerticalRatio();
    _numberFive.layer.cornerRadius = 6*VerticalRatio();
    _numberSix.layer.cornerRadius = 6*VerticalRatio();
    
    
    _registField.leftViewMode = UITextFieldViewModeAlways;
    _registField.leftView = [[UIView alloc]initWithFrame:flexibleFrame(CGRectMake(0, 0, 10, 42), NO)];
    _registField.delegate = self;
}

- (IBAction)back:(id)sender {
    [self.navigationController  popViewControllerAnimated:YES];
}


#pragma mark ==  管理  点击事件 104-109
- (IBAction)controlHandel:(UIButton *)sender {
    switch (sender.tag) {
        case 104://团购管理
        {
            UIStoryboard *secondStroyBoard=[UIStoryboard storyboardWithName:@"PersonCenterStoryboard" bundle:nil];
            UIViewController *page = [secondStroyBoard instantiateViewControllerWithIdentifier:@"GroupBuying"];
            [self.navigationController   pushViewController:page animated:YES];
        }
            break;
        case 105://订单管理
        {
        }
            break;
        case 106://商品管理
        {
            UIStoryboard *secondStroyBoard=[UIStoryboard storyboardWithName:@"PersonCenterStoryboard" bundle:nil];
            UIViewController *page = [secondStroyBoard instantiateViewControllerWithIdentifier:@"CommodityManagement"];
            [self.navigationController   pushViewController:page animated:YES];
        }
            break;
        case 107://店铺管理
        {
            UIStoryboard *secondStroyBoard=[UIStoryboard storyboardWithName:@"PersonCenterStoryboard" bundle:nil];
            UIViewController *page = [secondStroyBoard instantiateViewControllerWithIdentifier:@"ManageStore"];
            [self.navigationController   pushViewController:page animated:YES];
        }
            break;
        case 108://优惠管理
        {
        }
            break;
        case 109://统计分析
        {
            UIStoryboard *secondStroyBoard=[UIStoryboard storyboardWithName:@"PersonCenterStoryboard" bundle:nil];
            UIViewController *page = [secondStroyBoard instantiateViewControllerWithIdentifier:@"ValidationTicket"];
            [self.navigationController   pushViewController:page animated:YES];
        }
            break;
        default:
            break;
    }
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
